<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="none">
    <meta name="author" content="Geofarry_Liang">
    <title>QueryTools System</title>
    <!-- Bootstrap core CSS -->
    <link href="/QueryTools/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/QueryTools/css/signin.css" rel="stylesheet">
    <style type="text/css">
    body {
	  padding-top: 70px;
	}
    </style>
    <script type="text/javascript">
     
    </script>
  </head>
  <body>
    <c:import url="/front/front_head.jsp"></c:import>
    <div class="container">

        <h1 align="center" class="form-signin-heading">查询结果</h1>
        <div class="bs-example">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>编号</th>
						<c:forEach var="detail" items="${query.theme.themeDetails }">
							<c:choose>
									<c:when test="${detail.item=='name' }">
										<th>姓名</th>
									</c:when>
									<c:when test="${detail.item=='sex' }">
										<th>性别</th>
									</c:when>
									<c:when test="${detail.item=='address' }">
										<th>家庭住址</th>
									</c:when>
									<c:when test="${detail.item=='age' }">
										<th>年龄</th>
									</c:when>
									<c:when test="${detail.item=='phone' }">
										<th>电话号码</th>
									</c:when>
									<c:when test="${detail.item=='email' }">
										<th>电子邮箱</th>
									</c:when>
								</c:choose>
						</c:forEach>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="stu" items="${students }" varStatus="status">
						<tr>
								<td>${status.index+1 }</td>
								
						<c:forEach var="detail" items="${query.theme.themeDetails }">
								<c:choose>
									<c:when test="${detail.item=='name' }">
										<td>${stu.name }</td>
									</c:when>
									<c:when test="${detail.item=='sex' }">
										<td>${stu.sex==1?'男':'女' }</td>
									</c:when>
									<c:when test="${detail.item=='address' }">
										<td>${stu.address }</td>
									</c:when>
									<c:when test="${detail.item=='age' }">
										<td>${stu.age }</td>
									</c:when>
									<c:when test="${detail.item=='phone' }">
										<td>${stu.phone }</td>
									</c:when>
									<c:when test="${detail.item=='email' }">
										<td>${stu.email }</td>
									</c:when>
								</c:choose>
						</c:forEach>
						</tr>
					</c:forEach>
					<tr>
					<tr>
				</tbody>
			</table>
		</div>
		<div align="center">
			<a href="javascript:window.close()" class="btn btn-lg btn-primary" role="button">返回</a>
		</div>
    </div> <!-- /container -->
    <script src="/QueryTools/js/jquery-1.10.2.js"></script>
    <script src="/QueryTools/bootstrap/js/bootstrap.js"></script>
  </body>
</html>
